﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using Aj.Core;

public partial class Manager_left : AuthPageBase
{
    protected DataSet ds = null;

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);

        if (HttpContext.Current.User.Identity.Name != ConfigurationManager.AppSettings["SuperuserName"])
        {
            object obj = CustomQuery.SysUser_GetUserModule(HttpContext.Current.User.Identity.Name);
            if (DBNull.Value != obj && null != obj)
            {
                string[] mids = obj.ToString().Split(',');
                string strids = "";
                for (int i = 0; i < mids.Length; i++)
                {
                    if (i == mids.Length - 1)
                    {
                        strids += "'" + mids[i] + "'";
                    }
                    else
                    {
                        strids += "'" + mids[i] + "',";
                    }
                }
                if (!string.IsNullOrEmpty(strids))
                {
                    ds = CustomQuery.SysModule_GetUserModule(strids);
                }
            }
        }
        else
        {
            ds = CustomQuery.SysModule_GetUserModule("");
        }
    }
}